package com.konne.nightmare.FastPublicOpinion.mvp.presenter;

import com.konne.nightmare.FastPublicOpinion.base.BaseMvpPresenter;
import com.konne.nightmare.FastPublicOpinion.mvp.view.IGroupManagerView;
import com.konne.nightmare.FastPublicOpinion.ui.information.fragment.AddOrDelStudentFragment;
import com.konne.nightmare.FastPublicOpinion.ui.information.fragment.MoveGroupFragment;
import com.konne.nightmare.FastPublicOpinion.ui.information.fragment.MoveStudentFragment;
import com.konne.nightmare.FastPublicOpinion.ui.information.fragment.SetTeamLeaderFragment;
import com.konne.nightmare.FastPublicOpinion.ui.information.fragment.StudentListByGroupFragment;

/**
 * Create by ws.
 * on Data:2022/1/25  Time:下午 7:04.
 * description: ** .
 */
public class GroupManagerPresenter extends BaseMvpPresenter<IGroupManagerView> {
    /**
     * @param type 0:移动分组的学生，1：移动分组的组列表，2，分组下的学生列表3,从移入当前组，4，从当前组移除 5:设置组长
     * */
    public void init(int type) {
        switch (type){
            case 0:
                getView().setFragment(MoveStudentFragment.getInstance());
                break;
            case 1:
                getView().setFragment(MoveGroupFragment.getInstance());
                break;
            case 2:
                getView().setFragment(StudentListByGroupFragment.getInstance());
                break;
            case 3:
                getView().setFragment(AddOrDelStudentFragment.getInstance(0));
                break;
            case 4:
                getView().setFragment(AddOrDelStudentFragment.getInstance(1));
                break;
            case 5:
                getView().setFragment(SetTeamLeaderFragment.getInstance());
                break;
        }
    }
}
